package edu.chalmers.AV_2DPlatformerFramework.Model;

/**
 * {@code Layer} interacting with all other interactive {@code Layer}s.
 * @version 1.0
 * @author Gustav Vidhög
 */
public class UniversalInteractionLayer extends Layer {

    /**
     * Empty constructor.
     * @author Gustav Vidhög
     * @version 1.0
     * @since 1.0
     */
    public UniversalInteractionLayer () {
        ; // Empty constructor.
    }

    /**
     * Method specifying that this {@code Layer} is of the {@code UNIVERSAL}
     * interaction class.
     * @return {@code UNIVERSAL} interaction class.
     * @author Gustav Vidhög
     * @version 1.0
     * @since 1.0
     */
    @Override
    protected InteractionClass getInteractionClass() {
        return Layer.InteractionClass.UNIVERSAL;
    }
    
    /**
     * Creates and returns a deep copy of this
     * {@code UniversalInteractionLayer}. For any
     * {@code UniversalInteractionLayer} {@code l}, the expression:
     * <blockquote>
     * <pre>
     * l.copy() != l</pre></blockquote>
     * and the expression:
     * <blockquote>
     * <pre>
     * x.copy().equals(x)</pre></blockquote>
     * are both {@code true}.
     * @return a deep copy of this {@code UniversalInteractionLayer}.
     * @author Gustav Vidhög
     * @version 1.0
     * @since 1.0
     */
    @Override
    public UniversalInteractionLayer copy() {
        return new UniversalInteractionLayer();
    }
    
    /**
     * Indicates whether some other object is "equal to" this
     * {@code UniversalInteractionLayer}.
     * @param obj - the reference {@code Object} with which to compare.
     * @return {@code true} if this {@code UniversalInteractionLayer} is the
     * same as the {@code obj} argument; {@code false} otherwise.
     * @author Gustav Vidhög
     * @version 1.0
     * @since 1.0
     */
    @Override
    public boolean equals(Object obj) {
        return (this == obj ||
                (obj != null && obj.getClass() == this.getClass()));
    }

    /**
     * Returns a hash code value for the {@code UniversalInteractionLayer}.
     * @return a hash code value for this {@code UniversalInteractionLayer}.
     * @author Gustav Vidhög
     * @version 1.0
     * @since 1.0
     */
    @Override
    public int hashCode() {
        int hash = 2741; //400th prime.
        return hash;
    }
}
